/** Namespace badminton. */
export namespace badminton {

    /** Namespace proto. */
    export namespace proto {

        /** ErrorCode enum. */
        export enum ErrorCode {
            Success = 0,
            ServerError = 1,
            InvalidParams = 2,
            TimeNotYet = 3,
            GoldNotEnough = 4,
            GemsNotEnough = 5,
            ChipsNotEnough = 6,
            ActorNotUnlock = 7,
            ActorTryTimeout = 8,
            ActorTryTimesOver = 9,
            MaxLevel = 10,
            StringNotEnough = 11,
            ConsumableNotEnough = 12,
            EquipNotUnlock = 13,
            AdTimesOver = 14,
            GameStateNotMatch = 15,
            CouponsNotEnough = 16
        }

        /** ActorTrySource enum. */
        export enum ActorTrySource {
            PlayerUI = 0
        }

        /** UnlockType enum. */
        export enum UnlockType {
            UnlockType_PERMANENT = 0,
            UnlockType_TRYTIMES = 1,
            UnlockType_TRYDURATION = 2
        }

        /** EquipPosition enum. */
        export enum EquipPosition {
            EquipPosition_Racket = 0,
            EquipPosition_Glue = 1,
            EquipPosition_Sneakers = 2,
            EquipPosition_WristBand = 3,
            EquipPosition_Food = 4,
            EquipPosition_Train = 5,
            EquipPosition_String = 6,
            EquipPosition_Consumable = 7
        }

        /** ChestPosition enum. */
        export enum ChestPosition {
            ChestPosition_Free = 0,
            ChestPosition_1 = 1,
            ChestPosition_2 = 2,
            ChestPosition_3 = 3,
            ChestPosition_4 = 4
        }

        /** ChestPositionState enum. */
        export enum ChestPositionState {
            ChestPositionState_Free = 0,
            ChestPositionState_Unlock = 1,
            ChestPositionState_Lock = 2
        }

        /** ChestState enum. */
        export enum ChestState {
            ChestState_Lock = 0,
            ChestState_Unlock = 1
        }

        /** ChestOperate enum. */
        export enum ChestOperate {
            ChestOperate_Open = 0,
            ChestOperate_Unlock = 1,
            ChestOperate_AdLeap = 2,
            ChestOperate_GemsOpen = 3,
            ChestOperate_AdUnlockPos = 4,
            ChestOperate_UnlockWithLeap = 5,
            ChestOperate_AdUnlock = 6
        }

        /** Quality enum. */
        export enum Quality {
            Normal = 0
        }

        /** GameType enum. */
        export enum GameType {
            BeginnerTraining = 0,
            PVP = 1,
            PVE = 2
        }

        /** GameState enum. */
        export enum GameState {
            Cancelled = 0,
            Match = 1,
            Prepare = 2,
            Playing = 3,
            Finised = 4
        }

        /** GameResult enum. */
        export enum GameResult {
            Lose = 0,
            Win = 1,
            DRAW = 2
        }

        /** Properties of a Currency. */
        export interface ICurrency {

            /** Currency gold */
            gold?: (number|null);

            /** Currency gems */
            gems?: (number|null);
        }

        /** Represents a Currency. */

        /** Properties of an Equipment. */
        export interface IEquipment {

            /** Equipment equipmentId */
            equipmentId?: (number|null);

            /** Equipment quality */
            quality?: (badminton.proto.Quality|null);

            /** Equipment level */
            level?: (number|null);

            /** Equipment chips */
            chips?: (number|null);
        }

        /** Represents an Equipment. */

        /** Properties of a Chest. */
        export interface IChest {

            /** Chest chestId */
            chestId?: (number|null);

            /** Chest state */
            state?: (badminton.proto.ChestState|null);

            /** Chest openTime */
            openTime?: (number|null);

            /** Chest adLeapTimes */
            adLeapTimes?: (number|null);
        }

        /** Represents a Chest. */

        /** Properties of a FreeChest. */
        export interface IFreeChest {

            /** FreeChest maxCount */
            maxCount?: (number|null);

            /** FreeChest openTimes */
            openTimes?: (number[]|null);
        }

        /** Represents a FreeChest. */

        /** Properties of an Actor. */
        export interface IActor {

            /** Actor actorId */
            actorId?: (number|null);

            /** Actor unlockType */
            unlockType?: (badminton.proto.UnlockType|null);

            /** Actor level */
            level?: (number|null);

            /** Actor exp */
            exp?: (number|null);

            /** Actor cup */
            cup?: (number|null);

            /** Actor chips */
            chips?: (number|null);

            /** Actor validTime */
            validTime?: (number|null);

            /** Actor times */
            times?: (number|null);

            /** Actor equipments */
            equipments?: ({ [k: string]: number }|null);
        }

        /** Represents an Actor. */

        /** Properties of a RewardState. */
        export interface IRewardState {

            /** RewardState isReceivable */
            isReceivable?: (boolean|null);

            /** RewardState isReceived */
            isReceived?: (boolean|null);
        }

        /** Represents a RewardState. */

        /** Properties of a TourLevelState. */
        export interface ITourLevelState {

            /** TourLevelState starCount */
            starCount?: (number|null);

            /** TourLevelState firstRewardState */
            firstRewardState?: (badminton.proto.IRewardState|null);
        }

        /** Represents a TourLevelState. */

        /** Properties of a TourChapterState. */
        export interface ITourChapterState {

            /** TourChapterState currentLevel */
            currentLevel?: (number|null);

            /** TourChapterState totalStarCount */
            totalStarCount?: (number|null);

            /** TourChapterState levelStates */
            levelStates?: ({ [k: string]: badminton.proto.ITourLevelState }|null);

            /** TourChapterState pointsRewardReceived */
            pointsRewardReceived?: (boolean[]|null);
        }

        /** Represents a TourChapterState. */

        /** Properties of a TourChapterDetail. */
        export interface ITourChapterDetail {

            /** TourChapterDetail currentChapterId */
            currentChapterId?: (number|null);

            /** TourChapterDetail tourChapterStates */
            tourChapterStates?: ({ [k: string]: badminton.proto.ITourChapterState }|null);
        }

        /** Represents a TourChapterDetail. */

        /** Properties of a BeginnerTrainingDetail. */
        export interface IBeginnerTrainingDetail {

            /** BeginnerTrainingDetail currentLevel */
            currentLevel?: (number|null);

            /** BeginnerTrainingDetail beginnerTrainingStates */
            beginnerTrainingStates?: ({ [k: string]: badminton.proto.IRewardState }|null);
        }

        /** Represents a BeginnerTrainingDetail. */

        /** Properties of a FightData. */
        export interface IFightData {

            /** FightData actorId */
            actorId?: (number|null);

            /** FightData actorLevel */
            actorLevel?: (number|null);

            /** FightData equipments */
            equipments?: ({ [k: string]: badminton.proto.IEquipment }|null);

            /** FightData stringId */
            stringId?: (number|null);

            /** FightData consumableId */
            consumableId?: (number|null);

            /** FightData aiLevel */
            aiLevel?: (number|null);
        }

        /** Represents a FightData. */

        /** Properties of a GameRecord. */
        export interface IGameRecord {

            /** GameRecord gameId */
            gameId?: (number|null);

            /** GameRecord type */
            type?: (badminton.proto.GameType|null);

            /** GameRecord subType */
            subType?: (number|null);

            /** GameRecord fightData */
            fightData?: (badminton.proto.IFightData|null);

            /** GameRecord opponent */
            opponent?: (badminton.proto.IPlayerData|null);

            /** GameRecord state */
            state?: (badminton.proto.GameState|null);

            /** GameRecord result */
            result?: (badminton.proto.GameResult|null);

            /** GameRecord rewards */
            rewards?: (badminton.proto.IReward[]|null);

            /** GameRecord cupChanged */
            cupChanged?: (number|null);
        }

        /** Represents a GameRecord. */

        /** Properties of a CouponItem. */
        export interface ICouponItem {

            /** CouponItem itemId */
            itemId?: (number|null);

            /** CouponItem amount */
            amount?: (number|null);

            /** CouponItem lastResetTime */
            lastResetTime?: (number|null);

            /** CouponItem lastUpdateTime */
            lastUpdateTime?: (number|null);

            /** CouponItem leftAdBuytimes */
            leftAdBuytimes?: (number|null);
        }

        /** Represents a CouponItem. */

        /** Properties of a UserData. */
        export interface IUserData {

            /** UserData version */
            version?: (number|null);

            /** UserData nickName */
            nickName?: (string|null);

            /** UserData headIcon */
            headIcon?: (string|null);

            /** UserData region */
            region?: (string|null);

            /** UserData currency */
            currency?: (badminton.proto.ICurrency|null);

            /** UserData nextAdRewardTime */
            nextAdRewardTime?: (number|null);

            /** UserData equipments */
            equipments?: ({ [k: string]: badminton.proto.IEquipment }|null);

            /** UserData badmintonString */
            badmintonString?: ({ [k: string]: number }|null);

            /** UserData consumable */
            consumable?: ({ [k: string]: number }|null);

            /** UserData chestStates */
            chestStates?: ({ [k: string]: badminton.proto.ChestPositionState }|null);

            /** UserData freeChest */
            freeChest?: (badminton.proto.IFreeChest|null);

            /** UserData chestInfos */
            chestInfos?: ({ [k: string]: badminton.proto.IChest }|null);

            /** UserData actors */
            actors?: ({ [k: string]: badminton.proto.IActor }|null);

            /** UserData battleActor */
            battleActor?: (number|null);

            /** UserData lastOwnBattleActor */
            lastOwnBattleActor?: (number|null);

            /** UserData coupons */
            coupons?: ({ [k: string]: badminton.proto.ICouponItem }|null);

            /** UserData lastGameRecord */
            lastGameRecord?: (badminton.proto.IGameRecord|null);

            /** UserData beginnerTrainingDetail */
            beginnerTrainingDetail?: (badminton.proto.IBeginnerTrainingDetail|null);

            /** UserData tourChapterDetail */
            tourChapterDetail?: (badminton.proto.ITourChapterDetail|null);

            /** UserData totalCups */
            totalCups?: (number|null);

            /** UserData cupLevel */
            cupLevel?: (number|null);
        }

        /** Represents a UserData. */

        /** Properties of an ItemsChange. */
        export interface IItemsChange {

            /** ItemsChange currency */
            currency?: (badminton.proto.ICurrency|null);

            /** ItemsChange equipments */
            equipments?: ({ [k: string]: badminton.proto.IEquipment }|null);

            /** ItemsChange badmintonString */
            badmintonString?: ({ [k: string]: number }|null);

            /** ItemsChange consumable */
            consumable?: ({ [k: string]: number }|null);

            /** ItemsChange actors */
            actors?: ({ [k: string]: badminton.proto.IActor }|null);

            /** ItemsChange chestInfos */
            chestInfos?: ({ [k: string]: badminton.proto.IChest }|null);

            /** ItemsChange battleActor */
            battleActor?: (number|null);

            /** ItemsChange coupons */
            coupons?: ({ [k: string]: badminton.proto.ICouponItem }|null);

            /** ItemsChange totalCups */
            totalCups?: (number|null);

            /** ItemsChange cupLevel */
            cupLevel?: (number|null);
        }

        /** Represents an ItemsChange. */

        /** Properties of a Reward. */
        export interface IReward {

            /** Reward itemId */
            itemId?: (number|null);

            /** Reward amount */
            amount?: (number|null);
        }

        /** Represents a Reward. */

        /** Properties of a PlayerData. */
        export interface IPlayerData {

            /** PlayerData fightData */
            fightData?: (badminton.proto.IFightData|null);

            /** PlayerData nickName */
            nickName?: (string|null);

            /** PlayerData headIcon */
            headIcon?: (string|null);

            /** PlayerData region */
            region?: (string|null);
        }

        /** Represents a PlayerData. */

        /** Properties of an AdRewardReq. */
        export interface IAdRewardReq {
        }

        /** Represents an AdRewardReq. */

        /** Properties of an AdRewardResp. */
        export interface IAdRewardResp {

            /** AdRewardResp code */
            code?: (badminton.proto.ErrorCode|null);

            /** AdRewardResp syncData */
            syncData?: (badminton.proto.IUserData|null);

            /** AdRewardResp rewards */
            rewards?: (badminton.proto.IReward[]|null);

            /** AdRewardResp changes */
            changes?: (badminton.proto.IItemsChange|null);

            /** AdRewardResp nextAdRewardTime */
            nextAdRewardTime?: (number|null);
        }

        /** Represents an AdRewardResp. */

        /** Properties of a ChestOperateReq. */
        export interface IChestOperateReq {

            /** ChestOperateReq operate */
            operate?: (badminton.proto.ChestOperate|null);

            /** ChestOperateReq position */
            position?: (badminton.proto.ChestPosition|null);
        }

        /** Represents a ChestOperateReq. */

        /** Properties of a ChestOperateResp. */
        export interface IChestOperateResp {

            /** ChestOperateResp code */
            code?: (badminton.proto.ErrorCode|null);

            /** ChestOperateResp syncData */
            syncData?: (badminton.proto.IUserData|null);

            /** ChestOperateResp operate */
            operate?: (badminton.proto.ChestOperate|null);

            /** ChestOperateResp position */
            position?: (badminton.proto.ChestPosition|null);

            /** ChestOperateResp rewards */
            rewards?: (badminton.proto.IReward[]|null);

            /** ChestOperateResp changes */
            changes?: (badminton.proto.IItemsChange|null);

            /** ChestOperateResp freeChest */
            freeChest?: (badminton.proto.IFreeChest|null);

            /** ChestOperateResp costGems */
            costGems?: (number|null);

            /** ChestOperateResp chestDeleted */
            chestDeleted?: (boolean|null);
        }

        /** Represents a ChestOperateResp. */

        /** Properties of an ActorTryReq. */
        export interface IActorTryReq {

            /** ActorTryReq actorId */
            actorId?: (number|null);

            /** ActorTryReq source */
            source?: (badminton.proto.ActorTrySource|null);
        }

        /** Represents an ActorTryReq. */

        /** Properties of an ActorTryResp. */
        export interface IActorTryResp {

            /** ActorTryResp code */
            code?: (badminton.proto.ErrorCode|null);

            /** ActorTryResp syncData */
            syncData?: (badminton.proto.IUserData|null);

            /** ActorTryResp actorId */
            actorId?: (number|null);

            /** ActorTryResp source */
            source?: (badminton.proto.ActorTrySource|null);

            /** ActorTryResp changes */
            changes?: (badminton.proto.IItemsChange|null);
        }

        /** Represents an ActorTryResp. */

        /** Properties of an ActorBattleReq. */
        export interface IActorBattleReq {

            /** ActorBattleReq actorId */
            actorId?: (number|null);
        }

        /** Represents an ActorBattleReq. */

        /** Properties of an ActorBattleResp. */
        export interface IActorBattleResp {

            /** ActorBattleResp code */
            code?: (badminton.proto.ErrorCode|null);

            /** ActorBattleResp syncData */
            syncData?: (badminton.proto.IUserData|null);

            /** ActorBattleResp actorId */
            actorId?: (number|null);
        }

        /** Represents an ActorBattleResp. */

        /** Properties of an ActorUpgradeReq. */
        export interface IActorUpgradeReq {

            /** ActorUpgradeReq actorId */
            actorId?: (number|null);
        }

        /** Represents an ActorUpgradeReq. */

        /** Properties of an ActorUpgradeResp. */
        export interface IActorUpgradeResp {

            /** ActorUpgradeResp code */
            code?: (badminton.proto.ErrorCode|null);

            /** ActorUpgradeResp syncData */
            syncData?: (badminton.proto.IUserData|null);

            /** ActorUpgradeResp actorId */
            actorId?: (number|null);

            /** ActorUpgradeResp changes */
            changes?: (badminton.proto.IItemsChange|null);
        }

        /** Represents an ActorUpgradeResp. */

        /** Properties of an ActorEquipReq. */
        export interface IActorEquipReq {

            /** ActorEquipReq actorId */
            actorId?: (number|null);

            /** ActorEquipReq position */
            position?: (badminton.proto.EquipPosition|null);

            /** ActorEquipReq equipmentId */
            equipmentId?: (number|null);
        }

        /** Represents an ActorEquipReq. */

        /** Properties of an ActorEquipResp. */
        export interface IActorEquipResp {

            /** ActorEquipResp code */
            code?: (badminton.proto.ErrorCode|null);

            /** ActorEquipResp syncData */
            syncData?: (badminton.proto.IUserData|null);

            /** ActorEquipResp actorId */
            actorId?: (number|null);

            /** ActorEquipResp position */
            position?: (badminton.proto.EquipPosition|null);

            /** ActorEquipResp equipmentId */
            equipmentId?: (number|null);

            /** ActorEquipResp changes */
            changes?: (badminton.proto.IItemsChange|null);
        }

        /** Represents an ActorEquipResp. */

        /** Properties of an EquipmentUpgradeReq. */
        export interface IEquipmentUpgradeReq {

            /** EquipmentUpgradeReq equipmentId */
            equipmentId?: (number|null);
        }

        /** Represents an EquipmentUpgradeReq. */

        /** Properties of an EquipmentUpgradeResp. */
        export interface IEquipmentUpgradeResp {

            /** EquipmentUpgradeResp code */
            code?: (badminton.proto.ErrorCode|null);

            /** EquipmentUpgradeResp syncData */
            syncData?: (badminton.proto.IUserData|null);

            /** EquipmentUpgradeResp equipmentId */
            equipmentId?: (number|null);

            /** EquipmentUpgradeResp changes */
            changes?: (badminton.proto.IItemsChange|null);
        }

        /** Represents an EquipmentUpgradeResp. */

        /** Properties of a MatchLockReq. */
        export interface IMatchLockReq {

            /** MatchLockReq type */
            type?: (badminton.proto.GameType|null);

            /** MatchLockReq subType */
            subType?: (number|null);
        }

        /** Represents a MatchLockReq. */

        /** Properties of a MatchLockResp. */
        export interface IMatchLockResp {

            /** MatchLockResp code */
            code?: (badminton.proto.ErrorCode|null);

            /** MatchLockResp syncData */
            syncData?: (badminton.proto.IUserData|null);

            /** MatchLockResp gameId */
            gameId?: (number|null);

            /** MatchLockResp type */
            type?: (badminton.proto.GameType|null);

            /** MatchLockResp subType */
            subType?: (number|null);

            /** MatchLockResp nextState */
            nextState?: (badminton.proto.GameState|null);

            /** MatchLockResp fightData */
            fightData?: (badminton.proto.IFightData|null);
        }

        /** Represents a MatchLockResp. */

        /** Properties of a MatchResultReq. */
        export interface IMatchResultReq {

            /** MatchResultReq gameId */
            gameId?: (number|null);
        }

        /** Represents a MatchResultReq. */

        /** Properties of a MatchResultResp. */
        export interface IMatchResultResp {

            /** MatchResultResp code */
            code?: (badminton.proto.ErrorCode|null);

            /** MatchResultResp syncData */
            syncData?: (badminton.proto.IUserData|null);

            /** MatchResultResp nextState */
            nextState?: (badminton.proto.GameState|null);

            /** MatchResultResp opponent */
            opponent?: (badminton.proto.IPlayerData|null);
        }

        /** Represents a MatchResultResp. */

        /** Properties of a MatchCancelReq. */
        export interface IMatchCancelReq {

            /** MatchCancelReq gameId */
            gameId?: (number|null);
        }

        /** Represents a MatchCancelReq. */

        /** Properties of a MatchCancelResp. */
        export interface IMatchCancelResp {

            /** MatchCancelResp code */
            code?: (badminton.proto.ErrorCode|null);

            /** MatchCancelResp syncData */
            syncData?: (badminton.proto.IUserData|null);
        }

        /** Represents a MatchCancelResp. */

        /** Properties of an EnterGameReq. */
        export interface IEnterGameReq {

            /** EnterGameReq gameId */
            gameId?: (number|null);
        }

        /** Represents an EnterGameReq. */

        /** Properties of an EnterGameResp. */
        export interface IEnterGameResp {

            /** EnterGameResp code */
            code?: (badminton.proto.ErrorCode|null);

            /** EnterGameResp syncData */
            syncData?: (badminton.proto.IUserData|null);

            /** EnterGameResp gameId */
            gameId?: (number|null);

            /** EnterGameResp type */
            type?: (badminton.proto.GameType|null);

            /** EnterGameResp subType */
            subType?: (number|null);

            /** EnterGameResp fightData */
            fightData?: (badminton.proto.IFightData|null);

            /** EnterGameResp opponent */
            opponent?: (badminton.proto.IPlayerData|null);

            /** EnterGameResp changes */
            changes?: (badminton.proto.IItemsChange|null);
        }

        /** Represents an EnterGameResp. */

        /** Properties of a GameStatistics. */
        export interface IGameStatistics {
        }

        /** Represents a GameStatistics. */

        /** Properties of a GameSettlementReq. */
        export interface IGameSettlementReq {

            /** GameSettlementReq gameId */
            gameId?: (number|null);

            /** GameSettlementReq result */
            result?: (badminton.proto.GameResult|null);

            /** GameSettlementReq statistics */
            statistics?: (badminton.proto.IGameStatistics|null);

            /** GameSettlementReq starCount */
            starCount?: (number|null);
        }

        /** Represents a GameSettlementReq. */

        /** Properties of a GameSettlementResp. */
        export interface IGameSettlementResp {

            /** GameSettlementResp code */
            code?: (badminton.proto.ErrorCode|null);

            /** GameSettlementResp syncData */
            syncData?: (badminton.proto.IUserData|null);

            /** GameSettlementResp gameId */
            gameId?: (number|null);

            /** GameSettlementResp result */
            result?: (badminton.proto.GameResult|null);

            /** GameSettlementResp rewards */
            rewards?: (badminton.proto.IReward[]|null);

            /** GameSettlementResp cupChanged */
            cupChanged?: (number|null);

            /** GameSettlementResp changes */
            changes?: (badminton.proto.IItemsChange|null);

            /** GameSettlementResp beginnerTrainingDetail */
            beginnerTrainingDetail?: (badminton.proto.IBeginnerTrainingDetail|null);

            /** GameSettlementResp tourChapterDetail */
            tourChapterDetail?: (badminton.proto.ITourChapterDetail|null);
        }

        /** Represents a GameSettlementResp. */

        /** Properties of a BeginnerRewardReceiveReq. */
        export interface IBeginnerRewardReceiveReq {

            /** BeginnerRewardReceiveReq levelId */
            levelId?: (number|null);
        }

        /** Represents a BeginnerRewardReceiveReq. */

        /** Properties of a BeginnerRewardReceiveResp. */
        export interface IBeginnerRewardReceiveResp {

            /** BeginnerRewardReceiveResp code */
            code?: (badminton.proto.ErrorCode|null);

            /** BeginnerRewardReceiveResp syncData */
            syncData?: (badminton.proto.IUserData|null);

            /** BeginnerRewardReceiveResp levelId */
            levelId?: (number|null);

            /** BeginnerRewardReceiveResp changes */
            changes?: (badminton.proto.IItemsChange|null);

            /** BeginnerRewardReceiveResp rewards */
            rewards?: (badminton.proto.IReward[]|null);

            /** BeginnerRewardReceiveResp stateChagned */
            stateChagned?: (badminton.proto.IRewardState|null);
        }

        /** Represents a BeginnerRewardReceiveResp. */

        /** Properties of a TourPointRewardReceiveReq. */
        export interface ITourPointRewardReceiveReq {

            /** TourPointRewardReceiveReq chapterId */
            chapterId?: (number|null);

            /** TourPointRewardReceiveReq pointIndex */
            pointIndex?: (number|null);
        }

        /** Represents a TourPointRewardReceiveReq. */

        /** Properties of a TourPointRewardReceiveResp. */
        export interface ITourPointRewardReceiveResp {

            /** TourPointRewardReceiveResp code */
            code?: (badminton.proto.ErrorCode|null);

            /** TourPointRewardReceiveResp syncData */
            syncData?: (badminton.proto.IUserData|null);

            /** TourPointRewardReceiveResp chapterId */
            chapterId?: (number|null);

            /** TourPointRewardReceiveResp pointIndex */
            pointIndex?: (number|null);

            /** TourPointRewardReceiveResp changes */
            changes?: (badminton.proto.IItemsChange|null);

            /** TourPointRewardReceiveResp rewards */
            rewards?: (badminton.proto.IReward[]|null);

            /** TourPointRewardReceiveResp stateChagned */
            stateChagned?: (badminton.proto.ITourChapterState|null);
        }

        /** Represents a TourPointRewardReceiveResp. */
    }
}